<?php

/* * 注意此文档为UTF-8的编码.
 * Created on 2010-6-16
 *
 * @author EXT <isrn@qq.com>
 *
 */
include ('../../includes/global.php');
include ('../global.php');
include ("../power.php");
require_once './render.php';
require_once './items_config.php';
$dbcfg = Sys::Gp(array('dbcfg', 'sevenel'));
$donotrender = array('htmleditor', 'fckeditor', 'password', 'hidden');

switch ($_REQUEST['op']) {
    case 'sj': {
            $fldata = Dgd(array(
                'db' => 'd_sevenel',
                'cd' => "id = '" . $_GET['id'] . "'",
                'tn' => "fld",
                'limit' => '1'
                    ));
            $config = json_decode($fldata['zyz'], true);
            $config_num = count($config);
            Tr($fldata, 'fld');

            switch ($fldata['type']) {
                case 'radiogroup': {
                        if ($config_num != 0) {
                            foreach ($config as $key => $data) {
                                if ($data['ck'] == '1') {
                                    $checked = "checked: true,";
                                    Tr($data['xv'], 'xv');
                                    Tr($data['yv'], 'yv');
                                } else {
                                    $checked = "";
                                }
                                $items.= "{xtype:'radio',
									boxLabel: '{$data['xv']}',
									name: 'radio',
									columnWidth:.25,
									$checked
									listeners:{
											'check':function(radio){
													if(radio.checked){
													var label = radio.boxLabel;
													var value = radio.inputValue;
													Ext.getCmp('label').setValue(label);
													Ext.getCmp('value').setValue(value);
													}
											}},
									inputValue:'{$data['yv']}'
									}";
                                if ($key < $config_num - 1) {
                                    $items.= ",";
                                }
                            }
                            $items = ",items:[{$items}]";
                            Tr($items, 'items');
                        }
                        Ts('form/radiogroupvalue.html');
                        break;
                    }
                case 'checkboxgroup': {
                        if ($config_num != 0) {
                            foreach ($config as $key => $data) {
                                if ($data['ck'] == '1') {
                                    $checked = "checked: true,";
                                } else {
                                    $checked = "";
                                }
                                $items.= "{xtype:'checkbox',
									boxLabel: '{$data['xv']}',
									name: 'checkbox',
									columnWidth:.25,
									$checked
									listeners:{
											'check':function(checkbox){
													if(checkbox.checked){
													var label = checkbox.boxLabel;
													var value = checkbox.inputValue;
													Ext.getCmp('label').setValue(label);
													Ext.getCmp('value').setValue(value);
													}
											}},
									inputValue:'{$data['yv']}'
									}";
                                if ($key < $config_num - 1) {
                                    $items.= ",";
                                }
                            }
                            $items = ",items:[{$items}]";
                            Tr($items, 'items');
                        }
                        Ts('form/checkboxgroupvalue.html');
                        break;
                    }
                case 'checkboxgroup1': {
                        echo 111;
                        /*
                          if ($config_num != 0) {
                          foreach ($config as $key => $data) {
                          if ($data['ck'] == '1') {
                          $checked = "checked: true,";
                          } else {
                          $checked = "";
                          }
                          $items.= "{xtype:'checkbox',
                          boxLabel: '{$data['xv']}',
                          name: 'checkbox',
                          columnWidth:.25,
                          $checked
                          listeners:{
                          'check':function(checkbox){
                          if(checkbox.checked){
                          var label = checkbox.boxLabel;
                          var value = checkbox.inputValue;
                          Ext.getCmp('label').setValue(label);
                          Ext.getCmp('value').setValue(value);
                          }
                          }},
                          inputValue:'{$data['yv']}'
                          }";
                          if ($key < $config_num - 1) {
                          $items.= ",";
                          }
                          }
                          $items = ",items:[{$items}]";
                          Tr($items, 'items');
                          }
                          Ts('form/checkboxgroupvalue.html'); */
                        break;
                    }
                case 'combo': {
                        if ($config_num != 0) {
                            foreach ($config as $key => $data) {
                                if ($data['ck'] == '1') {
                                    Tr($data['yv'], 'ck');
                                    Tr($data['xv'], 'xv');
                                }
                                $items.= "['" . $data['xv'] . "','" . $data['yv'] . "']";
                                if ($key < $config_num - 1) {
                                    $items.= ",";
                                }
                            }
                            Tr($items, 'items');
                        }
                        Ts('form/combovalue.html');
                        break;
                    }
            }
            break;
        }

    case 'cfg': {
            $fldata = Dgd(array(
                'db' => 'd_sevenel',
                'cd' => "id = '" . $_GET['id'] . "'",
                'tn' => "fld",
                'limit' => '1'
                    ));
            $config = json_decode($fldata['cfg'], true);
            if ($config != '') {
                foreach ($config as $key => $v) {
                    $config[$key] = adxx($v);
                }
            }
            $config['STR'] = str_replace("\r", "", $config['STR']);
            $config['STR'] = str_replace("\n", "", $config['STR']);
            $config['STR'] = str_replace("\t", "", $config['STR']);
            Tr($config, 'cfg');
            foreach ($fldata as $key => $v) {
                $fldata[$key] = adxx($v);
            }
            Tr($fldata, 'fld');

            switch ($fldata['type']) {
                case 'textfield': {
                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
                case 'password': {
                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
                case 'textarea': {
                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
                case 'htmleditor': {
                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
                case 'fckeditor': {
                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
                case 'kindeditor': {
                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
                case 'fileup': {
                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
                case 'recommend': {
                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
                case 'radiogroup': {
                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
                case 'checkboxgroup': {
                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
                case 'checkboxgroup1': {
                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
                case 'combo': {
                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
                case 'combo1': {
                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
                case 'combosearch': {
                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
                case 'combo2': {
                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
                case 'combo3': {
                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
                case 'combossx': {
                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
                case 'datefield': {
                        //print_r($config['pbxq']);
                        Tr($config['pbxq'], 'pbxq');

                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
                case 'my97': {
                        //print_r($config['pbxq']);
                        Tr($config['pbxq'], 'pbxq');

                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
                case 'hidden': {
                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
                default : {
                        Ts('form/' . $fldata['type'] . '.html');
                        break;
                    }
            }
            break;
        }
    case 'save': {
            switch ($_POST['type']) {
                case 'hidden': {

                        $_POST['yxwk'] ? $_POST['yxwk'] = 1 : $_POST['yxwk'] = 0;
                        $_POST['bt'] ? $_POST['bt'] = 1 : $_POST['bt'] = 0;
                        $_POST['gj'] ? $_POST['gj'] = 1 : $_POST['gj'] = 0;
                        $_POST['zy'] ? $_POST['zy'] = 1 : $_POST['zy'] = 0;
                        $_POST['xr'] ? $_POST['xr'] = 1 : $_POST['xr'] = 0;
                        $_POST['cfg'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($_POST['cfg']));
                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);

                        ext_request('ok');
                        break;
                    }
                case 'textfield': {

                        $_POST['yxwk'] ? $_POST['yxwk'] = 1 : $_POST['yxwk'] = 0;
                        $_POST['bt'] ? $_POST['bt'] = 1 : $_POST['bt'] = 0;
                        $_POST['gj'] ? $_POST['gj'] = 1 : $_POST['gj'] = 0;
                        $_POST['zy'] ? $_POST['zy'] = 1 : $_POST['zy'] = 0;
                        $_POST['xr'] ? $_POST['xr'] = 1 : $_POST['xr'] = 0;
                        $_POST['cfg'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($_POST['cfg']));
                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);

                        ext_request('ok');
                        break;
                    }
                case 'password': {

                        $_POST['yxwk'] ? $_POST['yxwk'] = 1 : $_POST['yxwk'] = 0;
                        $_POST['xr'] ? $_POST['xr'] = 1 : $_POST['xr'] = 0;
                        $_POST['cfg'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($_POST['cfg']));
                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);

                        ext_request('ok');
                        break;
                    }
                case 'datefield':
                case 'my97': {

                        $_POST['yxwk'] ? $_POST['yxwk'] = 1 : $_POST['yxwk'] = 0;
                        $_POST['bt'] ? $_POST['bt'] = 1 : $_POST['bt'] = 0;
                        $_POST['gj'] ? $_POST['gj'] = 1 : $_POST['gj'] = 0;
                        $_POST['zy'] ? $_POST['zy'] = 1 : $_POST['zy'] = 0;
                        $_POST['xr'] ? $_POST['xr'] = 1 : $_POST['xr'] = 0;
                        $_POST['pbxq'][0] ? $_POST['pbxq'][0] = 0 : $_POST['pbxq'][0] = '';
                        $_POST['pbxq'][1] ? $_POST['pbxq'][1] = 1 : $_POST['pbxq'][1] = '';
                        $_POST['pbxq'][2] ? $_POST['pbxq'][2] = 2 : $_POST['pbxq'][2] = '';
                        $_POST['pbxq'][3] ? $_POST['pbxq'][3] = 3 : $_POST['pbxq'][3] = '';
                        $_POST['pbxq'][4] ? $_POST['pbxq'][4] = 4 : $_POST['pbxq'][4] = '';
                        $_POST['pbxq'][5] ? $_POST['pbxq'][5] = 5 : $_POST['pbxq'][5] = '';
                        $_POST['pbxq'][6] ? $_POST['pbxq'][6] = 6 : $_POST['pbxq'][6] = '';
                        $_POST['cfg']['pbxq'] = $_POST['pbxq'];
                        $_POST['cfg'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($_POST['cfg']));
                        //print_r($_POST['cfg']);
                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);
                        ext_request('ok');
                        break;
                    }
                case 'recommend': {

                        $_POST['yxwk'] ? $_POST['yxwk'] = 1 : $_POST['yxwk'] = 0;
                        $_POST['bt'] ? $_POST['bt'] = 1 : $_POST['bt'] = 0;
                        $_POST['gj'] ? $_POST['gj'] = 1 : $_POST['gj'] = 0;
                        $_POST['zy'] ? $_POST['zy'] = 1 : $_POST['zy'] = 0;
                        $_POST['xr'] ? $_POST['xr'] = 1 : $_POST['xr'] = 0;
                        $_POST['cfg']['paixu'] = $_POST['paixu'];
                        $_POST['cfg']['tjpx'] = $_POST['tjpx'];
                        $_POST['cfg']['mr'] = $_POST['mr'];
                        $_POST['cfg'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($_POST['cfg']));

                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);

                        ext_request('ok');
                        break;
                    }
                case 'textarea': {

                        $_POST['yxwk'] ? $_POST['yxwk'] = 1 : $_POST['yxwk'] = 0;
                        $_POST['bt'] ? $_POST['bt'] = 1 : $_POST['bt'] = 0;
                        $_POST['gj'] ? $_POST['gj'] = 1 : $_POST['gj'] = 0;
                        $_POST['zy'] ? $_POST['zy'] = 1 : $_POST['zy'] = 0;
                        $_POST['xr'] ? $_POST['xr'] = 1 : $_POST['xr'] = 0;
                        $_POST['cfg'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($_POST['cfg']));
                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);

                        ext_request('ok');
                        break;
                    }
                case 'htmleditor': {

                        $_POST['yxwk'] = 1;
                        $_POST['bt'] ? $_POST['bt'] = 1 : $_POST['bt'] = 0;
                        $_POST['gj'] ? $_POST['gj'] = 1 : $_POST['gj'] = 0;
                        $_POST['zy'] ? $_POST['zy'] = 1 : $_POST['zy'] = 0;
                        $_POST['xr'] ? $_POST['xr'] = 1 : $_POST['xr'] = 0;
                        $_POST['cfg'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($_POST['cfg']));
                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);

                        ext_request('ok');
                        break;
                    }
                case 'fckeditor': {

                        $_POST['yxwk'] = 1;
                        $_POST['bt'] ? $_POST['bt'] = 1 : $_POST['bt'] = 0;
                        $_POST['gj'] ? $_POST['gj'] = 1 : $_POST['gj'] = 0;
                        $_POST['zy'] ? $_POST['zy'] = 1 : $_POST['zy'] = 0;
                        $_POST['xr'] ? $_POST['xr'] = 1 : $_POST['xr'] = 0;
                        $_POST['cfg'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($_POST['cfg']));
                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);

                        ext_request('ok');
                        break;
                    }
                case 'kindeditor': {

                        $_POST['yxwk'] = 1;
                        $_POST['bt'] ? $_POST['bt'] = 1 : $_POST['bt'] = 0;
                        $_POST['gj'] ? $_POST['gj'] = 1 : $_POST['gj'] = 0;
                        $_POST['zy'] ? $_POST['zy'] = 1 : $_POST['zy'] = 0;
                        $_POST['xr'] ? $_POST['xr'] = 1 : $_POST['xr'] = 0;
                        $_POST['cfg'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($_POST['cfg']));
                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);

                        ext_request('ok');
                        break;
                    }
                case 'fileup': {

                        $_POST['yxwk'] = 1;
                        $_POST['bt'] ? $_POST['bt'] = 1 : $_POST['bt'] = 0;
                        $_POST['gj'] ? $_POST['gj'] = 1 : $_POST['gj'] = 0;
                        $_POST['zy'] ? $_POST['zy'] = 1 : $_POST['zy'] = 0;
                        $_POST['xr'] ? $_POST['xr'] = 1 : $_POST['xr'] = 0;
                        $cp = 1;
                        //复制文件
                        $dvalue = array('jpg', 'gif', 'png', 'bmp');
                        if (!$_FILES['sytp']['name']) {
                            $cp = 0;
                        }
                        $otype = substr(strtolower($_FILES['sytp']['name']), -3);
                        if (!in_array($otype, $dvalue)) {
                            $cp = 0;
                        }
                        if ($cp) {
                            $bcname = time() . "." . $otype;
                            $filename = "../../uplods/" . $bcname;
                            $copymes = copy($_FILES['sytp']['tmp_name'], $filename);
                            $_POST['cfg']['sytp'] = $bcname;
                        }
                        $_POST['cfg'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($_POST['cfg']));
                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);

                        ext_request('ok');
                        break;
                    }
                case 'radiogroup': {

                        $_POST['yxwk'] ? $_POST['yxwk'] = 1 : $_POST['yxwk'] = 0;
                        $_POST['bt'] ? $_POST['bt'] = 1 : $_POST['bt'] = 0;
                        $_POST['gj'] ? $_POST['gj'] = 1 : $_POST['gj'] = 0;
                        $_POST['zy'] ? $_POST['zy'] = 1 : $_POST['zy'] = 0;
                        $_POST['xr'] ? $_POST['xr'] = 1 : $_POST['xr'] = 0;
                        $_POST['cfg'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($_POST['cfg']));
                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);

                        ext_request('ok');
                        break;
                    }
                case 'radiogroupvalue': {
                        $_POST['type'] = 'radiogroup';
                        $temp = explode("#=#", $_POST['param']);
                        $temp = Au($temp, 1);
                        $zvl = array();
                        $i = 0;
                        foreach ($temp as $value) {
                            $temp_ = explode("#_#", $value);
                            if ($temp_ != '') {
                                $zvl[$i]['xv'] = $temp_[0];
                                $zvl[$i]['yv'] = $temp_[1];
                                $zvl[$i]['ck'] = $temp_[2];
                                $i++;
                            }
                        }

                        $_POST['zyz'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($zvl));
                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);
                        break;
                    }
                case 'checkboxgroup': {

                        $_POST['yxwk'] ? $_POST['yxwk'] = 1 : $_POST['yxwk'] = 0;
                        $_POST['bt'] ? $_POST['bt'] = 1 : $_POST['bt'] = 0;
                        $_POST['gj'] ? $_POST['gj'] = 1 : $_POST['gj'] = 0;
                        $_POST['zy'] ? $_POST['zy'] = 1 : $_POST['zy'] = 0;
                        $_POST['xr'] ? $_POST['xr'] = 1 : $_POST['xr'] = 0;
                        $_POST['cfg'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($_POST['cfg']));
                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);

                        ext_request('ok');
                        break;
                    }
                case 'checkboxgroupvalue': {
                        $_POST['type'] = 'checkboxgroup';
                        $temp = explode("#=#", $_POST['param']);
                        $temp = Au($temp, 1);
                        $zvl = array();
                        $i = 0;
                        foreach ($temp as $value) {
                            $temp_ = explode("#_#", $value);
                            if ($temp_ != '') {
                                $zvl[$i]['xv'] = $temp_[0];
                                $zvl[$i]['yv'] = $temp_[1];
                                $zvl[$i]['ck'] = $temp_[2];
                                $i++;
                            }
                        }

                        $_POST['zyz'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($zvl));
                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);
                        break;
                    }
                case 'checkboxgroup1': {

                        $_POST['yxwk'] ? $_POST['yxwk'] = 1 : $_POST['yxwk'] = 0;
                        $_POST['gj'] ? $_POST['gj'] = 1 : $_POST['gj'] = 0;
                        $_POST['zy'] ? $_POST['zy'] = 1 : $_POST['zy'] = 0;
                        $_POST['xr'] ? $_POST['xr'] = 1 : $_POST['xr'] = 0;
                        $_POST['cfg'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($_POST['cfg']));
                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);

                        ext_request('ok');
                        break;
                    }
                case 'combo': {

                        $_POST['yxwk'] ? $_POST['yxwk'] = 1 : $_POST['yxwk'] = 0;
                        $_POST['bt'] ? $_POST['bt'] = 1 : $_POST['bt'] = 0;
                        $_POST['gj'] ? $_POST['gj'] = 1 : $_POST['gj'] = 0;
                        $_POST['zy'] ? $_POST['zy'] = 1 : $_POST['zy'] = 0;
                        $_POST['xr'] ? $_POST['xr'] = 1 : $_POST['xr'] = 0;
                        $_POST['cfg'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($_POST['cfg']));
                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);
                        ext_request('ok');
                        break;
                    }
                case 'combosearch': {

                        $_POST['yxwk'] ? $_POST['yxwk'] = 1 : $_POST['yxwk'] = 0;
                        $_POST['bt'] ? $_POST['bt'] = 1 : $_POST['bt'] = 0;
                        $_POST['gj'] ? $_POST['gj'] = 1 : $_POST['gj'] = 0;
                        $_POST['zy'] ? $_POST['zy'] = 1 : $_POST['zy'] = 0;
                        $_POST['xr'] ? $_POST['xr'] = 1 : $_POST['xr'] = 0;
                        $_POST['cfg'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($_POST['cfg']));
                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);

                        ext_request('ok');
                        break;
                    }
                case 'combo1': {

                        $_POST['yxwk'] ? $_POST['yxwk'] = 1 : $_POST['yxwk'] = 0;
                        $_POST['bt'] ? $_POST['bt'] = 1 : $_POST['bt'] = 0;
                        $_POST['gj'] ? $_POST['gj'] = 1 : $_POST['gj'] = 0;
                        $_POST['zy'] ? $_POST['zy'] = 1 : $_POST['zy'] = 0;
                        $_POST['xr'] ? $_POST['xr'] = 1 : $_POST['xr'] = 0;
                        $_POST['cfg']['dtjl'] = $_POST['dtjl'];
                        $_POST['cfg'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($_POST['cfg']));
                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);

                        ext_request('ok');
                        break;
                    }
                case 'combo2': {

                        $_POST['yxwk'] ? $_POST['yxwk'] = 1 : $_POST['yxwk'] = 0;
                        $_POST['bt'] ? $_POST['bt'] = 1 : $_POST['bt'] = 0;
                        $_POST['gj'] ? $_POST['gj'] = 1 : $_POST['gj'] = 0;
                        $_POST['zy'] ? $_POST['zy'] = 1 : $_POST['zy'] = 0;
                        $_POST['xr'] ? $_POST['xr'] = 1 : $_POST['xr'] = 0;
                        $_POST['cfg'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($_POST['cfg']));
                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);

                        ext_request('ok');
                        break;
                    }
                case 'combo3': {

                        $_POST['yxwk'] ? $_POST['yxwk'] = 1 : $_POST['yxwk'] = 0;
                        $_POST['bt'] ? $_POST['bt'] = 1 : $_POST['bt'] = 0;
                        $_POST['gj'] ? $_POST['gj'] = 1 : $_POST['gj'] = 0;
                        $_POST['zy'] ? $_POST['zy'] = 1 : $_POST['zy'] = 0;
                        $_POST['xr'] ? $_POST['xr'] = 1 : $_POST['xr'] = 0;
                        $_POST['cfg']['jb'] = $_POST['jb'];
                        $_POST['cfg'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($_POST['cfg']));
                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);

                        ext_request('ok');
                        break;
                    }
                case 'combovalue': {
                        $_POST['type'] = 'combo';
                        $temp = explode("#=#", $_POST['param']);
                        $temp = Au($temp, 1);
                        $zvl = array();
                        $i = 0;
                        foreach ($temp as $value) {
                            $temp_ = explode("#_#", $value);
                            if ($temp_ != '') {
                                $zvl[$i]['xv'] = $temp_[0];
                                $zvl[$i]['yv'] = $temp_[1];
                                if ($temp_[1] == $_POST['ck']) {
                                    $zvl[$i]['ck'] = '1';
                                } else {
                                    $zvl[$i]['ck'] = '0';
                                }
                                $i++;
                            }
                        }

                        $_POST['zyz'] = magic_quotes_gpc_OPEN_json_encode_Handle(json_encode($zvl));
                        Du('sevenel', 'fld', $_POST, 'id', $_POST['id'], 1);
                        break;
                    }
            }
            break;
        }
}
?>